package com.mrx.tunnel.model;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author Mr.X
 * @since 2024/9/2 07:40
 */
@Data
@AllArgsConstructor(staticName = "of")
public class Pair<L, R> {
    private final L left;
    private final R right;

    public static <L, R> Pair<L, R> ofLeft(L left) {
        return of(left, null);
    }

    public static <L, R> Pair<L, R> ofRight(R right) {
        return of(null, right);
    }
}
